﻿@model OAuthViewModel
@{
    ViewData["Title"] = "Home Page";
}

<div class="text-center">
    <h1 class="display-4">Welcome</h1>
    <p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
</div>

<!-- Steeltoe: Display OAuth information. -->
@if (Model.Options != null)
{
    <div class="alert alert-secondary">
        <h4>OAuth info</h4>
        <table class="table table-bordered table-primary">
            <thead>
            <tr>
                <th scope="col">Setting</th>
                <th scope="col">Value</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>ClientId</td>
                <td>@Model.Options.ClientId</td>
            </tr>
            <tr>
                <td>ClientSecret</td>
                <td>@Model.Options.ClientSecret</td>
            </tr>
            <tr>
                <td>UserAuthorizationUrl</td>
                <td>@Model.Options.UserAuthorizationUrl</td>
            </tr>
            <tr>
                <td>AccessTokenUrl</td>
                <td>@Model.Options.AccessTokenUrl</td>
            </tr>
            <tr>
                <td>UserInfoUrl</td>
                <td>@Model.Options.UserInfoUrl</td>
            </tr>
            <tr>
                <td>TokenInfoUrl</td>
                <td>@Model.Options.TokenInfoUrl</td>
            </tr>
            <tr>
                <td>JwtKeyUrl</td>
                <td>@Model.Options.JwtKeyUrl</td>
            </tr>
            <tr>
                <td>ValidateCertificates</td>
                <td>@Model.Options.ValidateCertificates</td>
            </tr>
            <tr>
                <td>Scopes</td>
                <td>@string.Join(", ", Model.Options.Scope)</td>
            </tr>
            </tbody>
        </table>

    </div>
}
